import React from "react";
import GoodCard from "@/components/GoodCard/GoodCard";
import type { Datum } from "@/type/HomeType";
import "./Like.scss";

interface LikeProps {
   title: string;
   goodList: Datum[];
}

const Like: React.FunctionComponent<LikeProps> = ({ title, goodList }) => {
   return (
      <div className="like">
         <div className="title">-- {title} --</div>
         <div className="good-list">
            {goodList?.map((item, index) => <GoodCard good={item} key={index}></GoodCard>)}
         </div>
      </div>
   );
};

export default Like;
